<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    @property --x {
      syntax: "<length>";
      inherits: false;
      initial-value: 0px;
    }
    @property --y {
      syntax: "<angle>";
      inherits: false;
      initial-value: 0deg;
    }
    .bar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: #f34545;
      transform-origin: center center;
      transform: rotate(10deg) translate(20px);
      position: absolute;
      left: 50%;
      top: 50%;
    }
    .dot {
      height: 1px;
      width: 1px;
      background-color: black;
      position: absolute;
      border-radius: 50%;
    }
    @keyframes x {
      to {
        --x: 100px;
      }
    }
    @keyframes y {
      to {
        --y: 360deg;
      }
    }
  </style>
  <body>
    <div class="bar">2</div>
  </body>
  <script>
    /* let bar = document.querySelector(".bar");
    function drawLine() {
      let { left, top, height, width } = bar.getBoundingClientRect();
      const div = document.createElement("div");
      div.style.transform = `translate(${left + 12}px,${top + 12}px)`;
      div.className = "dot";
      document.body.appendChild(div);
      requestAnimationFrame(drawLine);
    }
    drawLine(); */
  </script>
</html>
